% show eigen background
function test
    showbackground = false;
    bgFrameNum = 60;
    frameNr = 1;

    file = fopen('/scratch/hu/data/gesture_05');
    
    % read background from file by line
    bgs = [];
    if (~showbackground)
        for i = 1:bgFrameNum
            line = fgetl(file);
            bg = regexp(line,',','split');
            bg = str2double(bg);
            bg = bg(2:end);
            bgs = [bgs;bg];
        end
        bgs = cropImgs(bgs);
        ev = getEigenbg(bgs);
    end
    for i = 1 : bgFrameNum
        subplot(5,bgFrameNum/5,i);
        img = reshape(ev(i,:),144,157);
        plotImgVecC(img);
    end
end
    
    